package com.lyz.dataStructure.algorithm.商汤科技2020;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 18:56
 * @Description:
 **/

import java.util.Scanner;

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/8/19 18:56
 *@Description:
 **/
public class Main2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N= sc.nextInt();
        int[] nums = new int[N];
        for(int i =0;i<N;i++){
            nums[i] = sc.nextInt();
        }
        System.out.println(longestMountain(nums));
    }

    public static int longestMountain(int[] A){
        int incr = 0,decr=0,ans = 0;
        for(int i =0;i<A.length-1;i++){
            if(A[i]<=A[i+1]){
                if(decr>0){
                    if(incr>0){
                        ans = Math.max(ans,decr+incr+1);
                        incr = 0;
                    }
                    decr=0;
                }
                if(A[i]<A[i+1]){
                    incr++;
                }else {
                    incr =0;
                }
            }else if(A[i]>A[i+1]){
                decr++;
            }
        }
        if(decr>0&&incr>0){
            ans=Math.max(ans,decr+incr+1);
        }
        return ans;
    }
}
